package com.csc.dao;

import java.util.List;

import com.csc.domain.SystemAccount;
import com.csc.domain.SystemAccountType;
import com.csc.domain.SystemStatus;
import com.csc.domain.TransactionHistory;

public interface SystemAccountDAO {

	public List<SystemAccount> getAccounts();

	// Truong Le Bao
	public List<SystemAccount> getRegisteredAccounts(String username);

	// Truong Le Bao
	public List<SystemAccount> searchAdvanceRegisteredAccounts(String fullName, String username, String idcard, String phone, String address, String email, String role, String status, String loginID);

	// Truong Le Bao
	public SystemAccount getAccountByUsername(String userName);
	
	public List<SystemAccount> getAccountsByUsername(String userName);

	public boolean createNewAccount(SystemAccount sysAcc, int accType,
			int status);

	public boolean updatePassword(String username, String password);

	public boolean updateAdminName(String username, String fName, String lName,
			String mName);

	public boolean updateAdminIdCardNumber(String username, String idCardNo);

	public boolean updateAdminPhone(String username, String phone1,
			String phone2);

	public boolean updateAdminEmail(String username, String email1,
			String email2);

	public boolean updateAdminAddress(String username, String add1, String add2);

	public List<SystemAccount> getListAccountActive();

	public int countNumUserAdmin();

	public int countNumUserSupport();

	public int countNumAccountAdmin();

	public int countNumAccountSupport();

	public int countNumReportSupport();

	public SystemAccount getAccountByLoginId(String loginid);

	public boolean doActiveAccountByAdmin(TransactionHistory trans,
			String accAff, int stt);

	public boolean doDisableAccountByAdmin(TransactionHistory trans,
			String accAff, int stt);

	/* @Author:transonhoang */
	public List<TransactionHistory> getListAdminNewUsers();

	public List<TransactionHistory> searchNewUserRegistrationByAdvanced(
			String name, String LoginId, String IdCardNumber, String Phone,
			String address, String Email, String role);

	public boolean ApproveNewUserInAdminPage(
			TransactionHistory transactionHistory, String AccAffect, int status);

	public boolean RejectNewUserInAdminPage(
			TransactionHistory transactionHistory, String AccAffect, int status);

	public boolean createNewSystemAccount(String accountLoginId,
			String accountIDCardNumber, String accountFirstName,
			String accountLastName, String accountMidName,
			String accountPhone1, String accountPhone2, String accountEmail1,
			String accountEmail2, String accountAddress1,
			String accountAddress2, SystemAccountType role, SystemStatus stt);

	public boolean createNewTransactionHistory(TransactionHistory trans);

	public String generateRandomString(int length);
	public SystemAccount getNewUserDetail(String loginid);
	/* end hoang */
}
